package com.mwh.yuantu.dao;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mwh.yuantu.dao.mapper.UserProfileInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mwh.yuantu.entity.UserProfileInfoEntity;

/**
 * (UserProfileInfo)表数据库访问层
 *
 * @author maweihong
 * @since 2023-11-01 09:47:33
 */
@Service
public class UserProfileInfoDao extends ServiceImpl<UserProfileInfoMapper , UserProfileInfoEntity> {

    @Autowired
	private UserProfileInfoMapper userProfileInfoMapper;

    /**
     * 批量更新用户
     * @param param
     */
    public int batchUpdate(Map<String, Object> param) {
        return userProfileInfoMapper.batchUpdate(param);
    }

    /**
     * 注册新用户
     * @param userProfileInfo
     */
    public int insert(UserProfileInfoEntity userProfileInfo){
        return userProfileInfoMapper.insert(userProfileInfo);
    }

    /**
     * 查询指定用户组的数量
     * @param groupId 用户组主键
     * @return
     */
    public int countByGroupId(String groupId){
        return userProfileInfoMapper.countByGroupId(groupId);
    }

    /**
     * 保存用户信息
     * @param userProfileInfo
     */
    public int update(UserProfileInfoEntity userProfileInfo){
        return userProfileInfoMapper.update(userProfileInfo);
    }




}

